using Kingdee.BOS.WebApi.Client;
using Newtonsoft.Json.Linq;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace KingdeeViewBillDemo
{
    class LoginTool
    {
        public static int Login(K3CloudApiClient client)
        {
            
            //K3CloudApiClient client = new K3CloudApiClient("http://110.xx.13.110/k3cloud/");

            String loginResult = client.ValidateLogin("60d1833eb4c418", "Administrator", "xxxxx", 2052);

            int resultType = JObject.Parse(loginResult)["LoginResultType"].Value<int>();
            return resultType;
        }
    }
}
